package com.springcloud.auth.authorization.provider.fallback;

import com.springcloud.auth.authorization.provider.SystemUserProvider;
import com.springcloud.common.core.entity.R;
import com.springcloud.common.core.exception.ApiErrorCode;
import com.springcloud.common.entity.SystemRole;
import com.springcloud.common.entity.SystemUser;

import java.util.Set;

/**
 * <p>  </p>
 *
 * @author mori
 * @since 11/4/2019 3:30 PM
 */
public class SystemUserProviderFallback implements SystemUserProvider {

    @Override
    public R<SystemUser> getSystemUserByUsername(String username) {
        return R.failed(ApiErrorCode.SYSTEM_BUSY);
    }

    @Override
    public R<Set<SystemRole>> getRoleListByUserId(Integer userId) {
        return R.failed(ApiErrorCode.SYSTEM_BUSY);
    }
}
